package com.simon.hse.activity.safe;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.simon.hse.R;
import com.simon.hse.activity.BaseActivity;
import com.simon.hse.activity.safe.jobticket.JobTicketActivity;
import com.simon.hse.activity.safe.jsa.JsaAnalyseActivity;
import com.simon.hse.activity.safe.safeedu.SafeEducationActivity;
import com.simon.hse.activity.safe.saferisk.SafeAndRiskActivity;
import com.simon.hse.activity.safe.safework.SafeWorkActivity;
import com.simon.hse.activity.safe.workpermit.WorkPermitManagerActivity;

import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.Event;
import org.xutils.view.annotation.ViewInject;

@SuppressWarnings("all")
@ContentView(R.layout.activity_safe_manager)
public class SafeManagerActivity extends BaseActivity {
    @ViewInject(R.id.tv_common_title)
    TextView mTv_common_title;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        mTv_common_title.setText("安全作业管理");
    }

    @Event(value = {R.id.iv_common_left})
    private void back(View view) {
        Intent intent = new Intent();
        switch (view.getId()) {
            case R.id.iv_common_left:
                finish();
                break;
        }
    }

    @Event(value = {R.id.ll_function_1, R.id.ll_function_2, R.id.ll_function_3, R.id.ll_function_4, R.id.ll_function_5, R.id.ll_function_6})
    private void clickFunction(View view) {
        Intent intent = new Intent();
        switch (view.getId()) {
            case R.id.ll_function_1:
                intent.setClass(SafeManagerActivity.this, WorkPermitManagerActivity.class);
                break;
            case R.id.ll_function_2:
                intent.setClass(SafeManagerActivity.this, SafeWorkActivity.class);
                break;
            case R.id.ll_function_3:
                intent.setClass(SafeManagerActivity.this, JsaAnalyseActivity.class);
                break;
            case R.id.ll_function_4:
                intent.setClass(SafeManagerActivity.this, JobTicketActivity.class);
                break;
            case R.id.ll_function_5:
                intent.setClass(SafeManagerActivity.this, SafeAndRiskActivity.class);
                break;
            case R.id.ll_function_6:
                intent.setClass(SafeManagerActivity.this, SafeEducationActivity.class);
                break;
        }
        startActivity(intent);
    }
}
